import { createRouter, createWebHistory } from 'vue-router';

const routes = [
  {
    path: "/login",
    component: () => import("@/pages/login/index.vue"),
  },
  {
    path: "/",
    redirect: "/home",
    component: () => import("@/pages/main/index.vue"),
    children: [
      {
        path: "/home",
        component: () => import("@/pages/home/index.vue"),
      },
      {
        path: "/member",
        component: () => import("@/pages/member/list.vue"),
      },
    ]
  },
];

export default createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes
})
